﻿var config = {
    link: 'http://m.rongji365.com',
    img_url: 'http://m.rongji365.com/Storage/CommResource/sicon.jpg',
    imgUrl: 'http://m.rongji365.com/Storage/CommResource/sicon.jpg',
    title: '蓉记鲜鲜鲜',
    desc: '-全国首家健康生活元素电商平台'
};

document.addEventListener('WeixinJSBridgeReady', function () {
    var WJ = WeixinJSBridge;

    WJ.on('menu:share:appmessage', function () {
        WJ.invoke('sendAppMessage', config, function (res) {
            // _report('sendAppMessage', res.err_msg);
        });
    });

    WJ.on('menu:share:timeline', function () {
        config.title = config.title + config.desc;
        WJ.invoke('shareTimeline', config, function (res) {
            // _report('shareTimeline', res.err_msg);
        });
    });


    WJ.on('menu:share:weibo', function () {
        WJ.invoke('shareWeibo', config, function (res) {
            // _report('shareWeibo', res.err_msg);
        });
    });
});